import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useForgotState = defineStore(
  'forgot',
  () => {
    const fUser = ref({
      username: '',
      email: '',
      emailCode: '',
      code: '',
      password: '',
      tPassword: ''
    })
    const getFUser = () => {
      return fUser.value
    }
    const setFUser = (user) => {
      fUser.value = user
    }

    const clear = () => {
      fUser.value = { }
    }

    return {
      fUser,
      getFUser,
      setFUser,
      clear
    }
  }
)
